package mybatis.dao;

import mybatis.bean.User;
import mybatis.utils.DBUtils;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.stereotype.Repository;

@Repository
public class IndexDaoImpl implements IndexDao {
    @Override
    public User Login(String id) {
        SqlSessionFactory sf = DBUtils.obtionsqlSessionFactory();
        SqlSession ss = sf.openSession();

        User user = ss.selectOne("selectUser",id);

        return user;
    }
}
